/**
 * 功能描述 表单
 */

define(function (require, exports, module){
	var Form = require("form-2.0.0");
	var store =require("store");
	var activeUser = store.get("user");
	
	var instance = {
		initComponent: function (params,widget){
            var form=new Form({
				parentNode:".J-form",
				model:{
					id:"approvalDefineForm",
					defaultButton:false,
					items:[{
						name:"pkApprovalDefine",
						type:"hidden",
					},{
						name:"version",
						defaultValue:"0",
						type:"hidden"
					},{
						className:{
							container:"col-md-6",
							label:"col-md-4"
						},
						name:"description",
						label:"描述",
						validate:["required"]
					},{
						className:{
							container:"col-md-6",
							label:"col-md-4"
						},
						name:"setupTime",
						label:"设置时间",
						validate:["required"]
					},{
						className:{
							container:"col-md-6",
							label:"col-md-4"
						},
						name:"user.name",
						label:"设置人",
						validate:["required"]
					},{
						className:{
							container:"col-md-6",
							label:"col-md-4"
						},
						name:"status",
						label:"审批状态",
						type:"select",
						options:[{
							key:"Setting",
							value:"已启用"
						},{
							key:"BlockUp",
							value:"已停用"
						}],
						validate:["required"]
					}
					]
				}
			});
			widget.set("form", form);
		}
	};
	module.exports = instance;
});